POV-Ray : Newsgroups : povray.unofficial.patches : PovRay faster : Re: PovRay faster Server Time
2 Sep 2024 04:15:09 EDT (-0400)
  Re: PovRay faster  
From: Thorsten Froehlich
Date: 31 Jan 2001 21:50:26
Message: <3a78cef2$1@news.povray.org>
In article <slr### [at] tealhhjpat> , 
hjp### [at] SiKituwsracat (Peter J. Holzer) wrote:

> The code segment of povray for linux/intel is about 550 kB. Following
> the rule of thumb that 90 percent of the time is spent in 10 % of the
> code, a dll with the time critical routines would be about 55 kB. So for
> each supported processor variant the executable package would increase
> by about 55 kB.

pvengine.exe (at least the VC 6 one) is 1622016 bytes.  On the Mac you get
about the same size.

> Of course this assumes that the time critical routines can be moved to a
> dll. It is possible that these code fragments are so short that function
> calls (as opposed to inlining) add more overhead than can be saved by
> carefully hand-crafting them in assembler.

The question is how much overhead does calling DLL function introduce?  At
least on Macs a shared library call is done by addressing the function via a
table. In total about 10 instructions. For simple operations this would
eliminate the benefit.  Plus, vector and color math are not done with
functions in POV-Ray (they are C macros).  This benefit together with the
compiler optimisations that come along with it would be lost.

> I am also ignoring the trouble of generating and loading dlls on
> different platforms since these optimizations are platform dependent
> anyway.

True.


    Thorsten


Post a reply to this message

Copyright 2003-2023 Persistence of Vision Raytracer Pty. Ltd.